Boundary smoothing